<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://amc.af.mil/portal-el" prefix="portal" %>
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %>
<%@ taglib prefix="rad" uri="http://amc.af.mil/radtaglibrary" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="html" uri="http://struts.apache.org/tags-html-el" %>
<rad:useBean id="accountViewHelper"/>
<html>
<head>
    <title>Account Manager</title>
</head>

<body>

<div id="portal-left-bar">
    <jsp:include page="../../navigation/navigationMenu.jsp"/>
</div>

<div id="portal-content">

    <portal:box title="Manage Accounts" style="width:800px">

        <display:table name="accountViewHelper.all"
                       style="width:100%"
                       id="account">
            <display:column title="Name">
                <c:out value="${account.displayName}" />
            </display:column>
            <display:column title="Rank">
                <c:out value="${account.rank.abbreviation}" />
            </display:column>
            <display:column title="Organization">
                <c:out value="${account.organization.name}" />
            </display:column>
            <display:column title="Assigned Roles">
                <c:forEach var="authority" items="${account.authorities}">
                    <c:out value="${authority.authority}" /><br />
                </c:forEach>
            </display:column>

            <display:column title="Actions" style="text-align: center">
                <html:link href="accounts/viewEditAccount.do?accountId=${account.id}">Edit</html:link>
                <%--<html:link href="accounts/delete.do?accountId=${account.id}">Delete</html:link>--%>
            </display:column>
        </display:table>

    </portal:box>

</div>
</body>
</html>